
FLAG = -I. -L./omd -DFDTD_CONSOLE
INSTALL_DIR=$(HOME)
INSTALL_DIR_MAC=$(HOME)/Library/local

all:
	make -C drift -f Makefile$(MAKEHOST)
	make -C frontend -f Makefile$(MAKEHOST)

mac:
	make -C drift -f Makefile.mac
	make -C frontend -f Makefile.mac

document: 
	doxygen doc/dox.cfg

install: all
	@echo copying binaries to $(INSTALL_DIR)
	@mkdir -p $(INSTALL_DIR)/bin
	@mkdir -p $(INSTALL_DIR)/include/edrift
	@mkdir -p $(INSTALL_DIR)/lib
	cp frontend/edrift frontend/edrift-con $(INSTALL_DIR)/bin
	cp drift/*.h $(INSTALL_DIR)/include/edrift
	cp drift/*.a $(INSTALL_DIR)/lib
	
installmac: mac
	@echo copying binaries to $(INSTALL_DIR_MAC)
	@mkdir -p $(INSTALL_DIR_MAC)/bin
	@mkdir -p $(INSTALL_DIR_MAC)/include/edrift
	@mkdir -p $(INSTALL_DIR_MAC)/lib
	cp frontend/edrift frontend/edrift-con $(INSTALL_DIR_MAC)/bin
	cp drift/*.h $(INSTALL_DIR_MAC)/include/edrift
	cp drift/*.a $(INSTALL_DIR_MAC)/lib


clean:
#	make -C omd clean
	make -C drift clean
	make -C frontend clean
